package com.jintoufs.dao.org.impl;

import com.jintoufs.dao.MyBatisSupport;
import com.jintoufs.dao.org.OrgDAO;
import com.jintoufs.domain.org.Org;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 管理dao层接口实现
 */
@Repository
public class OrgDAOImpl extends MyBatisSupport<OrgDAO, Org> implements OrgDAO {

    @Override
    public List<Org> getByFilter(Map<String, Object> params) {
        return getMapper().getByFilter(params);
    }

    @Override
    public Integer update(Org user) {
        return getMapper().update(user);
    }

    @Override
    public Integer insert(Org user) {
        return getMapper().insert(user);
    }

    @Override
    public Org getById(int id) {
        return getMapper().getById(id);
    }

    @Override
    public void deleteById(Integer id) {
        getMapper().deleteById(id);
    }

    @Override
    public int getCountByParams(Map<String, Object> params) {
        return getMapper().getCountByParams(params);
    }

    @Override
    public boolean isUsedByUser(Integer id) {
        return getMapper().isUsedByUser(id);
    }
}
